<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>智慧社区后台</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/AdminLTE.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/plugins/bootstrap-table/css/bootstrap-table.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-switch/css/bootstrap-switch.min.css" />
</head>
<form id="from1" action="${webroot}/system/sysResource/improtExcel" method="post" enctype="multipart/form-data">
	<input type="file" id="uploadFile" name="uploadFile" />
	</from>
	<script type="text/javascript">
		//Excel文件导入到数据库中     
		function importEmp() {
			//检验导入的文件是否为Excel文件     
			var uploadFile = document.getElementById("uploadFile").value;
			if (uploadFile == null || uploadFile == '') {
				alert("请选择要上传的Excel文件");
				return;
			} else {
				var fileExtend = uploadFile.substring(uploadFile.lastIndexOf('.')).toLowerCase();
				if (fileExtend == '.xls') {
				} else {
					alert("文件格式需为'.xls'格式");
					return;
				}
			}
			//提交表单     
			document.getElementById("from1").submit();
		}
	</script>